/*
 *  Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 *  This source code is licensed under the MIT license found in the LICENSE
 *  file in the root directory of this source tree.
 *
 */

/*
 *  THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT; ALL CHANGES WILL BE LOST IN
 *  VAIN.
 *
 *  @generated
 */
#pragma once

#include <memory>
#include <string>
#include <utility>

#include <folly/Optional.h>
#include <folly/io/IOBuf.h>
#include <mcrouter/lib/carbon/CarbonProtocolReader.h>
#include <mcrouter/lib/carbon/CommonSerializationTraits.h>
#include <mcrouter/lib/carbon/Keys.h>
#include <mcrouter/lib/carbon/ReplyCommon.h>
#include <mcrouter/lib/carbon/RequestCommon.h>
#include <mcrouter/lib/carbon/RequestReplyUtil.h>
#include <mcrouter/lib/carbon/Result.h>
#include <mcrouter/lib/carbon/TypeList.h>
#include <mcrouter/lib/carbon/Variant.h>

#include "mcrouter/lib/carbon/test/gen/gen-cpp2/CarbonTest_types.h"

#include "mcrouter/lib/network/gen/CommonMessages.h"

#include "folly/container/F14Map.h"
#include "folly/container/F14Set.h"

namespace carbon {
namespace test {

class TestReply;

class TestRequest : public carbon::RequestCommon, public carbon::test::thrift::TestRequest {
 public:
  using reply_type = TestReply;

  static constexpr size_t typeId = 69;
  static constexpr const char* name = "test";

  TestRequest() = default;
  TestRequest(const TestRequest&) = default;
  TestRequest& operator=(const TestRequest&) = default;
  TestRequest(TestRequest&&) = default;
  TestRequest& operator=(TestRequest&&) = default;
  explicit TestRequest(folly::StringPiece sp) {
    key_ref() = sp;
  }
  explicit TestRequest(folly::IOBuf&& carbonKey) {
    key_ref() = std::move(carbonKey);
  }

  friend class apache::thrift::Cpp2Ops<TestRequest>;

};

class TestReply : public carbon::ReplyCommon, public carbon::test::thrift::TestReply {
 public:

  static constexpr size_t typeId = 70;

  TestReply() = default;
  TestReply(const TestReply&) = default;
  TestReply& operator=(const TestReply&) = default;
  TestReply(TestReply&&) = default;
  TestReply& operator=(TestReply&&) = default;
  explicit TestReply(carbon::Result carbonResult) {
    result_ref() = carbonResult;
  }

  friend class apache::thrift::Cpp2Ops<TestReply>;

};

class TestReplyStringKey;

class TestRequestStringKey : public carbon::RequestCommon, public carbon::test::thrift::TestRequestStringKey {
 public:
  using reply_type = TestReplyStringKey;

  static constexpr size_t typeId = 71;
  static constexpr const char* name = "testStringKey";

  TestRequestStringKey() = default;
  TestRequestStringKey(const TestRequestStringKey&) = default;
  TestRequestStringKey& operator=(const TestRequestStringKey&) = default;
  TestRequestStringKey(TestRequestStringKey&&) = default;
  TestRequestStringKey& operator=(TestRequestStringKey&&) = default;
  explicit TestRequestStringKey(folly::StringPiece sp) {
    key_ref() = sp;
  }
  explicit TestRequestStringKey(std::string&& carbonKey) {
    key_ref() = std::move(carbonKey);
  }
  explicit TestRequestStringKey(const char* key) {
    key_ref() = key;
  }

  friend class apache::thrift::Cpp2Ops<TestRequestStringKey>;

};

class TestReplyStringKey : public carbon::ReplyCommon, public carbon::test::thrift::TestReplyStringKey {
 public:

  static constexpr size_t typeId = 72;

  TestReplyStringKey() = default;
  TestReplyStringKey(const TestReplyStringKey&) = default;
  TestReplyStringKey& operator=(const TestReplyStringKey&) = default;
  TestReplyStringKey(TestReplyStringKey&&) = default;
  TestReplyStringKey& operator=(TestReplyStringKey&&) = default;
  explicit TestReplyStringKey(carbon::Result carbonResult) {
    result_ref() = carbonResult;
  }

  friend class apache::thrift::Cpp2Ops<TestReplyStringKey>;

};

using TestOptionalBool = carbon::test::thrift::TestOptionalBool;

using TestUnion = carbon::test::thrift::TestUnion;

using TestF14Containers = carbon::test::thrift::TestF14Containers;

using TestStdContainers = carbon::test::thrift::TestStdContainers;

using EnumUInt32 = carbon::test::thrift::EnumUInt32;

std::string enumEnumUInt32ToString(EnumUInt32 val);

using EnumUInt16 = carbon::test::thrift::EnumUInt16;

std::string enumEnumUInt16ToString(EnumUInt16 val);

using EnumUInt8 = carbon::test::thrift::EnumUInt8;

std::string enumEnumUInt8ToString(EnumUInt8 val);

using EnumInt32 = carbon::test::thrift::EnumInt32;

std::string enumEnumInt32ToString(EnumInt32 val);

using EnumInt16 = carbon::test::thrift::EnumInt16;

std::string enumEnumInt16ToString(EnumInt16 val);

using EnumInt8 = carbon::test::thrift::EnumInt8;

std::string enumEnumInt8ToString(EnumInt8 val);

using StructWithEnumUInt32 = carbon::test::thrift::StructWithEnumUInt32;

using StructWithEnumUInt16 = carbon::test::thrift::StructWithEnumUInt16;

using StructWithEnumUInt8 = carbon::test::thrift::StructWithEnumUInt8;

using StructWithEnumInt32 = carbon::test::thrift::StructWithEnumInt32;

using StructWithEnumInt16 = carbon::test::thrift::StructWithEnumInt16;

using StructWithEnumInt8 = carbon::test::thrift::StructWithEnumInt8;

using StructWithOptionalEnumUInt32 = carbon::test::thrift::StructWithOptionalEnumUInt32;

using StructWithOptionalEnumUInt16 = carbon::test::thrift::StructWithOptionalEnumUInt16;

using StructWithOptionalEnumUInt8 = carbon::test::thrift::StructWithOptionalEnumUInt8;

using StructWithOptionalEnumInt32 = carbon::test::thrift::StructWithOptionalEnumInt32;

using StructWithOptionalEnumInt16 = carbon::test::thrift::StructWithOptionalEnumInt16;

using StructWithOptionalEnumInt8 = carbon::test::thrift::StructWithOptionalEnumInt8;
} // namespace test
} // namespace carbon

#include "CarbonTestMessages-inl.h"
